import {CanActivate} from "@angular/router";

/**
 * 路由登录守卫
 */
export class LoginGuard implements CanActivate {
  canActivate()
  {

    let loggedIn: boolean = Math.random() < 0.5;

    if(!loggedIn) {
      console.log("用户未登陆:{}", loggedIn);
    }


    return loggedIn;
  }

}
